;    COUNTERS:
;         1 = Time before Katz arrives
;         2 = Time before Harvey arrives (after phone call)
;            3 = Harvey in room
;            4 = In Hallway after 10 moves
;            5 = Top Drawer Opened
;            6 = Phone off hook.
;            7 = Time on phone to Security.
;            8 = Katz in Room

;    FLAGS: 
;         0 = DEBUG
;         1 = LIGHT ON
;         5 = Top Drawer is OPEN when on
;         6 = Masking tape destroyed when on
;         8 = Answered Katz's question correctly.
;         10 = "OFF" - Lamp on EndTable.  "ON" - Lamp not on Endtable
;         11 = "OFF" - Lamp not on Plant Stand. "ON" - Lamp on Plant Stand
;         15 = DAMAGED PAPER still in shredder or destroyed
;         16 = ON LOOKING UNDER DRAWERS
;         20 = WHEN DRAWERS ARE OPEN
;          24 = BODY has been moved when ON
;          25 = OFFICE CHAIR IS MOVED TO BOOK CASE when ON
;          26 = DESK CHAIR IS MOVED TO BOOK CASE when ON
;          27 = DESK CHAIR HAS BEEN OILED when ON
;          28 = Standing on OFFICE CHAIR when ON
;          29 = Sitting on something when ON
;         
;         35 = "ON" - Lamp is On
;         50 = First code pressed when ON
;         51 = 2nd code pressed when ON
;         52 = 3rd code pressed when ON
;         53 = 4th code has been pressed, safe can be opened.
;         55 = Has read T.L. Scratchings when ON
;         56 = Has read Drawer Scratchings
;          60 = Title Page has been read when ON
;          70 = Have given Suicide NOTE to KATZ
;          71 = Have given PAPER to Katz (and proved it's not suicide)
;          72 = Have given TYPED STATIONERY to KATZ
;         255 = ON when on phone with Security

;  VARIABLES:
;         1 = Safe Buttons
;




; *** AFTER THE CALL IS MADE AND OFFICERS COME TO ROOM

COMMAND ANY
CounterGT 1 2 (3 moves after asking for Katz)
SendToRoom 303 10 (Katz)
TurnCounterON 8  (counter for Katz in room)
ClearScreen
Delay 1
PrintMessage 125  (Katz walks in and sees dead body, pulls gun...)
BlankLine
WaitForReturn
ClearScreen
PrintMessage 126  (Katz asks for an explanation)
END_COMMAND

; *********** Following is PART II of above command

COMMAND ANY
CounterGT 1 2 (3 moves after asking for Katz)
PrintMessage 135 (So let me get this straight.  You think the killer is...?)
BlankLine
AskQuestion 1 (????)
AnswerIsCorrect
BlankLine
TurnFlagON 8
PrintMessage 127  (Do you have any evidence to back up that claim?)
DoneWithTurn
END_COMMAND

; ***********Following is PART III, based on answer the question wrong.

COMMAND ANY
CounterGT 1 2 (3 moves after asking for Katz)
BlankLine
PrintMessage 127  (Do you have any evidence to back up that claim?)
TurnCounterOFF 1
DoneWithTurn
END_COMMAND


; **** CHECKS TO SEE IF PHONES OFF HOOK

COMMAND ANY
FlagOFF 255            (Not on phone with Security)
CounterGT 6 6          (Phone has been off hook for 6 moves)
OBJECTisNumber 206           (Black Telephone)
or
NOUNisNumber 206
ReDirectTo HANG UP ANY
END_COMMAND

COMMAND ANY
FlagOFF 255            (Not on phone with Security)
CounterGT 6 6          (Phone has been off hook for 6 moves)
NOUNisNumber 255       (Receiver)
or
OBJECTisNumber 255
ReDirectTo HANG UP ANY
END_COMMAND

COMMAND ANY
FlagOFF 255  (Not on phone with security)
CounterGT 6 6  (Phone has been off hook for 6 moves)
Tone 50 100
Tone 0 75
Tone 50 100
Tone 0 75
Tone 50 100
Tone 0 75
Tone 50 100
Tone 0 75
END_COMMAND

; **** Following is PART II of above command.

COMMAND ANY
FlagOFF 255 (Not on phone with security)
CounterGT 6 6    (Phone has been off hook for 6 moves)
Tone 50 100
Tone 0 75
Tone 50 100
Tone 0 75
Tone 50 100
Tone 0 75
PrintMessage 117 (You'd better hang up the receiver)
END_COMMAND

; ***** The following is PART III of above command.

COMMAND ANY
FlagOFF 255  (Not on phone with security)
CounterGT 6 6  (Phone has been off hook for 6 moves)
Tone 50 100
Tone 0 75
Tone 50 100
Tone 0 75
Tone 50 100
Tone 0 75
Tone 50 100
DoneWithTurn
END_COMMAND


COMMAND ANY
TurnsEquals 1           
SetVariableTo 1 0  (Variable for safe buttons set to 0)
END_COMMAND

; ****** IF you are sitting on something...

COMMAND ANY
FlagON 28   (Standing on office chair.)
FlagON 25   (Office chair at book case.)
NOUNisNumber 218 (Hamlet)
OR
NOUNisNumber 235 (Bookcase)
QuitAllCMDs
END_COMMAND

COMMAND ANY
FlagON 28   (Standing on office chair)
NOUNisNumber 218 (Hamlet)
ReDirectTo GET HAMLET
END_COMMAND

COMMAND ANY
FlagON 28   (Standing on office chair.)
PrintMessage 92   (Getting off chair....)
TurnFlagOFF 28    (No longer on chair.)
BlankLine
END_COMMAND

COMMAND ANY
FlagON 29        (Sitting down)
PrintMessage 80  (Getting up...)
BlankLine
TurnFlagOFF 29   (Now standing.)
END_COMMAND

;******** The following puts the Top-Left Scratchings here when
;******** the top-left drawer is open and the bottom left is closed.

COMMAND ANY
IsOpen 204       (Top-Left is open)
NOT Present 240  (T.L. scratchings are not here yet.)
SendToRoom 240 10(Puts top-left drawer scratchings in room)
END_COMMAND

COMMAND ANY
Present 240      (T.L. Drawer scratchings are here.)
IsClosed 204     (T.L. Drawer is closed.)
Destroy 240      (Put T.L. scratchings in room 0)
END_COMMAND

;**************

;********   The following check the top drawer conditions

COMMAND ANY
CounterGT 5 5        (The Top Drawer has been open for 5 turns)
IsOpen 205               (The Bottom-Left Drawer is open)
CloseIt 205              (Close Bottom-Left Drawer)
IsOpen 202               (The Top Drawer is open)
CloseIt 202              (Close Top Drawer)
TurnCounterOFF 5         (Top Drawer counter now reset)
TurnFlagOFF 5            (Top Drawer closed)
PrintMessage 46          (The Top Drawer and the Bottom-Left drawer shut...)
END_COMMAND

COMMAND ANY
CounterGT 5 5        (The Top Drawer has been open for 5 turns)
CloseIt 202              (Closes the Top Drawer)
TurnCounterOFF 5         (Top Drawer counter now reset)
TurnFlagOFF 5                  (Top Drawer closed)
PrintMessage 47          (The top drawer snaps shut...)
END_COMMAND

;     *********************************************
;     The following keeps you out of the hall too
;     late in the game.
;     *********************************************

COMMAND ANY
TurnsGT 10        
NOT AtLocation 10       (In Hallway)
CounterLT 4 1           (Check to see if Counter is already started)
TurnCounterON 4   (Counter for being in Hallway)
END_COMMAND

COMMAND ANY
CounterGT 4  4
AtLocation 10           (Back in room so Counter 4 is reset)
TurnCounterOFF 4
END_COMMAND

COMMAND ANY
NOT AtLocation 10 (In Hallway)
CounterGT 4  4
PrintMessage 18   (Harvey sends you home...)    
WaitForReturn
EndGame
DoneWithTurn
END_COMMAND

COMMAND ANY
TurnsGT  10
NOT AtLocation 10 (In Hallway)
CounterGT 4  2
CounterLT 4  5
PrintMessage 14   (Footsteps in hallway...)
END_COMMAND

COMMAND ANY
NOT AtLocation 10(In Hallway)
TurnsEquals 34    (Right before normal Harvey arrival)
PrintMessage 18  (Harvey sends you home...)
WaitForReturn
EndGame
DoneWithTurn
END_COMMAND

;********    The  following ANY COMMANDS Deal with Harvey at beginng.

COMMAND ANY
TurnsEquals 30
OR
TurnsEquals 31
PrintMessage 14 ("You hear footsteps in hall...")
END_COMMAND

COMMAND ANY
TurnsEquals 32
OR
TurnsEquals 33
PrintMessage 15 ("Footsteps getting closer...")
END_COMMAND

COMMAND ANY
TurnsEquals 35
Present 237
Present 258
PrintMessage 16 ("Footsteps outside door...")
Delay 4
PrintMessage 17 ("...And continue down hallway.")
END_COMMAND

COMMAND ANY
TurnsEquals 35
Present 264              (Switch is on)
PutInCurrentRoom 260    (Open Door)
Destroy 258  (Destroy closed door)
PutInCurrentRoom 302    (Harvey)
PutInCurrentRoom 212    (Harvey's Badge)
IsCarrying 209
PrintMessage 16          (Footsteps outside door...)
Delay 4
ClearScreen
PrintMessage 9       ("I was walking by and saw light on...You Gotta Gun!!!")
WaitForReturn
EndGame
DoneWithTurn
END_COMMAND

COMMAND ANY
TurnsEquals 35
Present 264        (Switch is on)
PutInCurrentRoom 260    (Open Door)
Destroy 258  (Destroy closed door)
PutInCurrentRoom 302    (Harvey)
PutInCurrentRoom 212    (Harvey's Badge)
PrintMessage 16          ("Footsteps outside door...")
Delay 4
ClearScreen
PrintMessage 10          ("I was walking by and saw light on...")
TurnCounterON 3    (Three moves until game ends.)
DoneWithTurn
END_COMMAND

COMMAND ANY
TurnsEquals 35
Present 260              (Door is open)
PutInCurrentRoom 264    (Puts the ON light here)
Destroy 237  (Destroys OFF light)
PutInCurrentRoom 302    (Harvey)
PutInCurrentRoom 212    (Harvey's Badge)
IsCarrying 209
PrintMessage 16          (Footsteps outside door...)
Delay 4
ClearScreen
PrintMessage 45          (The lights come on...)
PrintMessage 9        ("I was walking by and saw light on...YouGottaGun!!!")
WaitForReturn
EndGame
DoneWithTurn
END_COMMAND

COMMAND ANY
TurnsEquals 35
Present 260        (Door is open)
PutInCurrentRoom 264   (Puts the ON light here)
Destroy 237  (Destroys OFF light)
PutInCurrentRoom 302    (Harvey)
PutInCurrentRoom 212    (Harvey's Badge)
PrintMessage 16          ("Footsteps outside door...")
Delay 4
ClearScreen
PrintMessage 45          (The lights come on...)
PrintMessage 10          ("I was walking by and saw light on...")
TurnCounterON 3    (Three moves until game ends.)
DoneWithTurn
END_COMMAND

;  ******************* AFTER CALLING SEC. and NOT GETTING KATZ

COMMAND ANY
CounterGT 2 3 (4 moves after talking to Security & not getting Katz)
CounterEquals 3 4 (You have had three chances with Harvey)
IsOpen 256       (Steel Door)
PrintMessage 133 (Thought you could outsmart me?!!!)
WaitForReturn
END_COMMAND

; ******* PART II of above.

COMMAND ANY
CounterGT 2 3 (4 moves after talking to security and not getting Katz)
CounterEquals 3 4 (you have had three chances with Harvey)
IsOpen 256
ClearScreen
PrintMessage 141 (Listen, you're walking out with me....)
WaitForReturn
EndGame
DoneWithTurn
END_COMMAND

; ****** HARVEY COMES DOWN BECAUSE OF PHONE CALL BUT NOT AS VIOLENT
; ****** BECAUSE SAFE ISN"T EVEN OPENED YET.

COMMAND ANY
CounterGT 2 3 (4 moves after talking to Security & not getting Katz)
IsCarrying 209
SendToRoom 302 10 (Harvey)
SendToRoom 212 10 (Harvey's Badge)
ClearScreen
Delay 1
PrintMessage 9 (What's going...YOU GOTTA GUN!!!)
WaitForReturn
EndGame
DoneWithTurn
END_COMMAND

COMMAND ANY
CounterGT 2 3 (4 moves after talking to Security & not getting Katz)
SendToRoom 302 10 (Harvey)
SendToRoom 212 10 (Harvey's Badge)
ClearScreen
Delay 1
PrintMessage 153  (What the hell is going on?)
TurnCounterOFF 2
TurnCounterON 3   (3 moves till end of game)
DoneWithTurn
END_COMMAND

COMMAND ANY
CounterEquals 3 2
PrintMessage 11          ("Well...")
END_COMMAND

COMMAND ANY
CounterEquals 3 3
PrintMessage 12          ("Haven't got all day...")
END_COMMAND

COMMAND ANY
CounterEquals 3 4
PrintMessage 13     ("You're through...")
WaitForReturn
EndGame
DoneWithTurn
END_COMMAND


; *** KEEPS YOU FROM PUTTING A DECOY NOUN

COMMAND PUT ANY
NOUNisNumber 298 (one of the decoy nouns)
OR
NOUNisNumber 297 (one of the decoy nouns)
OR
NOUNisNumber 296 (one of the decoy nouns)
PrintMessage 142 (You can't do that because it's not here.)
DoneWithTurn
END_COMMAND

COMMAND PUT ANY
NOT NOUNIsCarrying
NOT NOUNIsWearing
PrintMessage 33 (You are not carrying the $NOUN$)
DoneWithTurn
END_COMMAND


COMMAND PUT ANY ON PHONE
NOUNisNumber 255       (Phone Receiver)
IsCarrying 255         (Phone Receiver)
DropIt 255             (Phone Receiver)
TurnFlagOFF 255        (Talking to security flag)
TurnCounterOFF 6       (Phone now back on hook)
PrintMessage 8 (You put receiver back on cradle)
DoneWithTurn
END_COMMAND

COMMAND PUT BATTERY IN RADIO
ReDirectTo REPLACE BATTERY WITH BATTERY
END_COMMAND


; *************   The following deals with Lamp Tone

COMMAND PUT LAMP ANY
NOT IsCarrying 263            (You don't have the lamp)
PrintMessage 33               (You don't have the $NOUN$)
DoneWithTurn
END_COMMAND


COMMAND PUT LAMP ON STAND
IsLocated 263 246             (Lamp is in Extension)
TurnFlagON 11                 (Lamp is now on Plant Stand)
SendToRoom   246 241          (Put Extension - lamp is inside - in Outlet)
PrintMessage 31               (You put lamp on stand, plug ext into outlet)
DoneWithTurn
END_COMMAND

COMMAND PUT LAMP ON STAND
IsLocated 246 241  (Ext is in outlet)
SendToRoom 263 246       (Put lamp in extension)
PrintMessage 169          (Lamp is now on stand and plugged in)
TurnFlagON 11           (Lamp is on stand)
DoneWithTurn
END_COMMAND

COMMAND PUT LAMP ON STAND
PrintMessage 32               (You put it on stand, but can't plug it in...)
DoneWithTurn
END_COMMAND

COMMAND PUT LAMP ON TABLE
IsLocated 263 246             (Lamp is in Extension)
SendToRoom  246 241           (Put Extension - lamp inside - in Outlet)
PrintMessage 34               (The lamp is now on the table and plugged in)
TurnFlagOFF 10                (Lamp is on table)
DoneWithTurn
END_COMMAND


COMMAND PUT LAMP ON TABLE
IsLocated 246 241  (Ext is in outlet)
SendToRoom 263 246       (Put lamp in extension)
PrintMessage 34          (Lamp is now on table and plugged in)
TurnFlagOFF 10           (Lamp is on table)
DoneWithTurn
END_COMMAND

COMMAND PUT LAMP ON TABLE
SendToRoom 263 241            (Put Lamp in Outlet)
PrintMessage 34               (The lamp is now on the table and plugged in.)
TurnFlagOFF 10                (Lamp is on table)
DoneWithTurn
END_COMMAND

COMMAND PUT LAMP IN OUTLET
PrintMessage 35               (Cord won't reach while you are holding lamp)
DoneWithTurn
END_COMMAND


COMMAND PUT LAMP IN EXTENSION
IsLocated 246 241            (The extension is already in outlet)
PrintMessage 36               (You can't...extension is out of your reach)
DoneWithTurn
END_COMMAND

COMMAND PUT LAMP IN EXTENSION
IsLocated 263 246   (Lamp is in extension)
PrintMessage 149    (The lamp is already plugged into extension)
DoneWithTurn
END_COMMAND

COMMAND PUT LAMP IN EXTENSION
IsCarrying 246                (You have the extension)
SendToRoom 263 246            (Plugs lamp into extension)
PrintMessage 145              (The lamp is now plugged into extension)
DoneWithTurn
END_COMMAND

COMMAND PUT LAMP ANY
IsCarrying 263      (You have the lamp)
IsLocated 263 246   (The lamp is in extension)
DropIt 246          (Drop the extension)
PrintMessage 168    (You put the lamp on $object$ but cord still won't reach)
DoneWithTurn
END_COMMAND

COMMAND PUT EXTENSION ANY
NOT IsCarrying 246            (You don't have the extension)
PrintMessage 33               (You don't have the $NOUN$)
DoneWithTurn
END_COMMAND

COMMAND PUT EXTENSION ON LAMP
ReDirectTo PUT LAMP IN EXTENSION
END_COMMAND

COMMAND PUT EXTENSION IN LAMP
ReDirectTo PUT LAMP IN EXTENSION
END_COMMAND

COMMAND PUT EXTENSION IN OUTLET
IsLocated 263 246            (Lamp is in Extension)
PrintMessage 37               (Even with the extension, you can't plug...)
DoneWithTurn
END_COMMAND

COMMAND PUT EXTENSION IN OUTLET
QuitAllCMDs                   (Let AGT put extension into outlet)
END_COMMAND

COMMAND PUT WD40 ON CHAIR
OBJECTisNumber 227     (Desk Chair)
IsCarrying 243         (You have the WD40)
PrintMessage 74        (You spray oil and the desk chair is now quite.)
TurnFlagON 27          (Desk chair is now oiled.)
DoneWithTurn
END_COMMAND

COMMAND PUT WD40 ANY
IsCarrying 243         (You have the WD40)
PrintMessage 74
DoneWithTurn
END_COMMAND

COMMAND PUT WD40 ANY
PrintMessage 33        (You don't have the $NOUN$)
DoneWithTurn
END_COMMAND

COMMAND PUT ANY IN TYPEWRITER
IsLocated 251 250 (Note is in typewriter.)
NOUNIsNumber 271  (Blank Stationery)
PrintMessage 113 (Something else in in typewriter)
DoneWithTurn
END_COMMAND

COMMAND PUT ANY IN TYPEWRITER
IsLocated 271 250  (Blank Stationery is in typewriter.)
NOUNIsNumber 251  (Suicide Note.)
PrintMessage 113 (Something else in in typewriter)
DoneWithTurn
END_COMMAND

COMMAND PUT ANY IN TYPEWRITER
NOUNisNumber 271 (Blank Stationery)
OR
NOUNisNumber 251 (Suicide Note)
QuitAllCMDs
END_COMMAND

COMMAND PUT ANY IN TYPEWRITER
PrintMessage 109    (Not a good idea, tampering with evidence.)
DoneWithTurn
END_COMMAND

; *** KEEPS YOU FROM DROPPING A DECOY NOUN

COMMAND DROP ANY 
NOUNisNumber 298 (one of the decoy nouns)
OR
NOUNisNumber 297 (one of the decoy nouns)
OR
NOUNisNumber 296 (one of the decoy nouns)
PrintMessage 142 (You can't do that because it's not here.)
DoneWithTurn
END_COMMAND

COMMAND DROP ANY
NOUNisNumber 255       (Phone Receiver)
or
NOUNisNumber 206       (Telephone)
IsCarrying 255         (Phone Receiver)
DropIt 255             (Phone Receiver)
TurnFlagOFF 255        (Talking to security flag)
TurnCounterOFF 6       (Phone now back on hook.)
PrintMessage 8 (You put receiver back on cradle)
DoneWithTurn
END_COMMAND

COMMAND DROP LAMP
PrintMessage 39               (You start to drop it but think better...)
DoneWithTurn
END_COMMAND

; *** KEEPS YOU FROM PUSHING A DECOY NOUN

COMMAND PUSH ANY 
NOUNisNumber 298 (one of the decoy nouns)
OR
NOUNisNumber 297 (one of the decoy nouns)
OR
NOUNisNumber 296 (one of the decoy nouns)
PrintMessage 142 (You can't do that because it's not here.)
DoneWithTurn
END_COMMAND

COMMAND PUSH ANY
NOT NOUNPresent
PrintMessage 142 (What $noun$, you don't see any $noun$ here...)
DoneWithTurn
END_COMMAND

COMMAND PUSH CHAIR ANY
NOUNisNumber 227       (Desk Chair)
FlagOFF 27             (Desk chair not oiled.)
PrintMessage 71        (A terrible squeek...)
Delay 4
ClearScreen
PrintMessage 85        (Officer Harvey comes in...)
WaitForReturn
EndGame
DoneWithTurn
END_COMMAND

COMMAND PUSH CHAIR TO BOOKCASE
NOUNisNumber 226       (Office Chair)
FlagON 24              (Body has been moved.)
TurnFlagON  25         (Office chair at bookcase.)
PrintMessage 69        (The chair is now at the base of the book case.)
DoneWithTurn
END_COMMAND

COMMAND PUSH CHAIR TO BOOKCASE
NOUNisNumber 227       (Desk Chair)
FlagON 24              (Body has been moved.)
FlagON 27              (Chair has been oiled.)
TurnFlagON 26          (Desk chair is now at bookcase.)
PrintMessage 69        (The chair is now at the base of the bookcase.)
DoneWithTurn
END_COMMAND

COMMAND PUSH CHAIR TO BOOKCASE
PrintMessage 72        (Body is in the way.)
DoneWithTurn
END_COMMAND

COMMAND PUSH CHAIR ANY
NOUNisNumber 226(Office chair)
OBJECTisNumber 258      (Closed door)
OR
OBJECTisNumber 260(Open door)
OR
OBJECTisNumber 232(West Wall)
OR
OBJECTisNumber 234(NorthWall)
OR
OBJECTisNumber 200(Desk)
TurnFlagOFF 26
END_COMMAND

; ************* Part II of above.

COMMAND PUSH CHAIR ANY
NOUNisNumber 226 (office chair)
OBJECTisNumber 199 (Dead Body)
OR
OBJECTisNumber 228 (End Table)
OR
OBJECTisNumber 229 (Plant Stand)
OR
OBJECTisNumber 241 (Electrical Outlet)
TurnFlagOFF 26
END_COMMAND

COMMAND PUSH CHAIR ANY
OBJECTisNumber 258      (Closed door)
OR
OBJECTisNumber 260(Open door)
OR
OBJECTisNumber 232(West Wall)
OR
OBJECTisNumber 234(NorthWall)
OR
OBJECTisNumber 200(Desk)
PrintMessage 73   (You move the $ADJECTIVE$ $NOUN$ to the$OBJECT$)
DoneWithTurn
END_COMMAND

;*******  PART II of above

COMMAND PUSH CHAIR ANY
OBJECTisNumber 199 (Dead Body)
OR
OBJECTisNumber 228 (End Table)
OR
OBJECTisNumber 229 (Plant Stand)
OR
OBJECTisNumber 241 (Electrical Outlet)
PrintMessage 73   (You move the $ADJECTIVE$ $NOUN$ to the $OBJECT$)
DoneWithTurn
END_COMMAND

COMMAND PUSH CHAIR ANY
PrintMessage 68        (Please specify where to move it to.)
DoneWithTurn
END_COMMAND


COMMAND PUSH TOGGLE
ToggleFlag 35           (When ON lamp is on.)
END_COMMAND

COMMAND PUSH TOGGLE
Present 231 (Safe is already here.)
ClearScreen
Tone 800 500     (Alarm goes off)
Tone 400 500
Tone 800 500
Tone 400 500
Tone 800 500
Tone 400 500
PrintMessage 85  (Harvey Comes in...)
END_COMMAND

; *** The following is PartII of above command.

COMMAND PUSH TOGGLE
Present 231 (Safe is already here.)
Tone 800 500
Tone 400 500
Tone 800 500
Tone 400 500
Tone 800 500
Tone 400 500
WaitForReturn
EndGame
DoneWithTurn
END_COMMAND

COMMAND PUSH TOGGLE
IsLocated 263 241 (Lamp Cord is plugged into outlet)
FlagON 35               (Lamp is ON)
Tone 2500 350
QuitAllCMDs
END_COMMAND

COMMAND PUSH TOGGLE
IsLocated 263 241 (Lamp Cord is plugged into outlet)
FlagOFF 35        (Lamp is OFF)
Tone 150 150
QuitAllCMDs
END_COMMAND

COMMAND PUSH TOGGLE
IsLocated 246 241 (Extension is plugged into outlet)
IsLocated 263 246 (Lamp Cord is in extension)
FlagON 35               (Lamp is ON)
Tone 2500 350
QuitAllCMDs
END_COMMAND

COMMAND PUSH TOGGLE
IsLocated 246 241 (Extension is plugged into outlet)
IsLocated 263 246 (Lamp Cord is in extension)
FlagOFF 35        (Lamp is OFF)
Tone 150 150
QuitAllCMDs
END_COMMAND

COMMAND PUSH TOGGLE
PrintMessage 30         (Nothing seems to happen...since lamp is unplugged)
DoneWithTurn
END_COMMAND

COMMAND PUSH LAMP
NOT IsCarrying 263  (You don't have the lamp)
PrintMessage 143 (If you'd like to move the lamp, pick it up, put it down...)
DoneWithTurn
END_COMMAND


COMMAND PUSH TABLE
Present 228      (End Table is still here.)
PrintMessage 81  (The $NOUN$ is too heavy to move in this manner.)
DoneWithTurn
END_COMMAND

COMMAND PUSH SAFE
Present 231      (Safe is now here.)
PrintMessage 81  (The $NOUN$ is too heavy to move in this manner.)
DoneWithTurn
END_COMMAND

COMMAND PUSH BODY
FlagON 24    (Body has already been moved)
PrintMessage 98   (You slop the body around again.)
DoneWithTurn
END_COMMAND

COMMAND PUSH BODY
PrintMessage 70        (Mustering all your strength you move the body...)
SendToRoom 284 10      (Bloody folder)
SendToRoom 288 10   (Send Folder 8 "The Invisible One" to office)
TurnFlagON 24          (Body is now moved.)
DoneWithTurn
END_COMMAND

COMMAND PUSH BUTTONS
NOT Present 256    (Safe not here yet.)
PrintMessage 142  (What $NOUN$ there isn't any $NOUN$ here.)
DoneWithTurn
END_COMMAND

COMMAND PUSH BUTTONS
Present 256 (Safe door is here.)
IsClosed 256      (Safe door is still closed.)
QuitAllCMDs
END_COMMAND

COMMAND PUSH BUTTON
Present 231       (Safe is here.)
PrintMessage 93   (Do you want to push the shredder button?)
BlankLine
PromptForNO       (If the answer is YES then it will go to next command.)
BlankLine
PrintMessage 94 (Then please push a specific button {e.g. PUSH A4}...)
DoneWithTurn
END_COMMAND

COMMAND PUSH BUTTON
FlagOFF 15  (Memo still here)
PrintMessage 24 (Memo goes through shredder)
Destroy 253       (Memo is now shredded history)
TurnFlagON 15     (Memo no longer exists)
DoneWithTurn
END_COMMAND

COMMAND PUSH BUTTON
FlagON 15   (Memo has been destroyed)
PrintMessage 25 (Shredder no longer is working...)
DoneWithTurn
END_COMMAND

COMMAND PUSH ANY
IsOpen 256  (Safe door is already opened)
NOUNisNumber 265 (A5)
OR
NOUNisNumber 266 (B2)
OR
NOUNisNumber 267 (C3)
OR
NOUNisNumber 268 (D1)
OR
NOUNisNumber 269 (D5 {Decoy buttons})
PrintMessage 96 (Safe is already opened.)
DoneWithTurn
END_COMMAND

COMMAND PUSH ANY
Present 231  (Safe is here.)
NOUNisNumber 265 (A5)
OR
NOUNisNumber 266 (B2)
OR
NOUNisNumber 267 (C3)
OR
NOUNisNumber 268 (D1)
OR
NOUNisNumber 269 (D5 {Decoy buttons})
Tone 2000 100
AddToVariable 1 1 (Add 1 to Safe Button Variable)
END_COMMAND

COMMAND PUSH ANY
Present 231 (safe is here.)
FlagON 52
NOUNisNumber 266 (B2)
TurnFlagOFF 52
TurnFlagON 53 (Flag for B2 and open safe)
END_COMMAND

COMMAND PUSH ANY
Present 231  (safe is here.)
FlagON 51
NOUNisNumber 265 (A5)
TurnFlagOFF 51
TurnFlagON 52     (Flag for A5)
END_COMMAND

COMMAND PUSH ANY
Present 231   (safe is here.)
FlagON 50
NOUNisNumber 268 (D1)
TurnFlagOFF 50
TurnFlagON 51     (Flag for D1)
END_COMMAND

COMMAND PUSH ANY
Present 231   (safe is here.)
FlagOFF 50
NOUNisNumber 267 (C3)
TurnFlagON 50 (Flag for C3)
END_COMMAND

COMMAND PUSH ANY
VariableEquals 1 4
FlagOFF 56  (Has not read Drawer scratchings.)
FlagOFF 55  (Has not read T.L. Scratchings.)
NOUNisNumber 265 (A5)
OR
NOUNisNumber 266 (B2)
OR
NOUNisNumber 267 (C3)
OR
NOUNisNumber 268 (D1)
OR
NOUNisNumber 269 (D5 {Decoy buttons})
ReDirectTo KICK BUTT
END_COMMAND
  
COMMAND PUSH ANY
VariableEquals 1 4
FlagON 53   (Open Safe flag on)
NOUNisNumber 265 (A5)
OR
NOUNisNumber 266 (B2)
OR
NOUNisNumber 267 (C3)
OR
NOUNisNumber 268 (D1)
OR
NOUNisNumber 269 (D5 {Decoy buttons})
OpenIt 256  (Steel Door)
OpenIt 231  (Large Safe)
ClearScreen
END_COMMAND

; **** The following is Part II of the above command

COMMAND PUSH ANY
VariableEquals 1 4
FlagON 53   (Open Safe flag on)
NOUNisNumber 265 (A5)
OR
NOUNisNumber 266 (B2)
OR
NOUNisNumber 267 (C3)
OR
NOUNisNumber 268 (D1)
OR
NOUNisNumber 269 (D5 {Decoy buttons})
Tone 2000 500
Delay 3
PrintMessage 95 (The safe clicks open, revealing...)
DoneWithTurn
END_COMMAND

COMMAND PUSH ANY
VariableEquals 1 4
FlagOFF 53     (The Open Safe flag is NOT on)
NOUNisNumber 265 (A5)
OR
NOUNisNumber 266 (B2)
OR
NOUNisNumber 267 (C3)
OR
NOUNisNumber 268 (D1)
OR
NOUNisNumber 269 (D5 {Decoy buttons})
ReDirectTo KICK BUTT
DoneWithTurn
END_COMMAND

COMMAND PUSH ANY
NOUNisNumber 265 (A5)
OR
NOUNisNumber 266 (B2)
OR
NOUNisNumber 267 (C3)
OR
NOUNisNumber 268 (D1)
OR
NOUNisNumber 269 (D5 {Decoy buttons})
DoneWithTurn
END_COMMAND

COMMAND PUSH ANY
PrintMessage 82        (Moving the $NOUN$ is this manner just won't help)
DoneWithTurn
END_COMMAND

COMMAND KICK BUTT
ClearScreen
Tone 800 500     (Alarm goes off)
Tone 400 500
Tone 800 500
Tone 400 500
Tone 800 500
Tone 400 500
PrintMessage 85  (Harvey Comes in...)
END_COMMAND

; *** The following is PartII of above command.

COMMAND KICK BUTT
Tone 800 500
Tone 400 500
Tone 800 500
Tone 400 500
Tone 800 500
Tone 400 500
WaitForReturn
EndGame
DoneWithTurn
END_COMMAND

; *** KEEPS YOU FROM PULLING A DECOY NOUN

COMMAND PULL ANY
NOUNisNumber 298 (one of the decoy nouns)
OR
NOUNisNumber 297 (one of the decoy nouns)
OR
NOUNisNumber 296 (one of the decoy nouns)
PrintMessage 142 (You can't do that because it's not here.)
DoneWithTurn
END_COMMAND


;******* Following deals with getting masking tape off of drawer

COMMAND PULL ANY
NOT AtLocation 10       (You are in the Office)
NOT NOUNPresent         (The noun is not here.)
PrintMessage 142    (You can't do that, because it's not here.)
DoneWithTurn
END_COMMAND

COMMAND PULL TAPE WITH TWEEZERS
ReDirectTo GET TAPE WITH TWEEZERS
END_COMMAND

COMMAND PULL TAPE ANY
ReDirectTo GET TAPE ANY
END_COMMAND

COMMAND PULL CHAIR ANY
NOUNisNumber 227       (Desk Chair)
FlagOFF 27             (Desk chair not oiled.)
PrintMessage 71        (A terrible squeek...)
Delay 4
ClearScreen
PrintMessage 85        (Officer Harvey comes in...)
WaitForReturn
EndGame
DoneWithTurn
END_COMMAND

COMMAND PULL CHAIR TO BOOKCASE
NOUNisNumber 226       (Office Chair)
FlagON 24              (Body has been moved.)
TurnFlagON  25         (Office chair at bookcase.)
PrintMessage 69        (The chair is now at the base of the book case.)
DoneWithTurn
END_COMMAND

COMMAND PULL CHAIR TO BOOKCASE
NOUNisNumber 227       (Desk Chair)
FlagON 24              (Body has been moved.)
FlagON 27              (Chair has been oiled.)
TurnFlagON 26          (Desk chair is now at bookcase.)
PrintMessage 69        (The chair is now at the base of the bookcase.)
DoneWithTurn
END_COMMAND

COMMAND PULL CHAIR TO BOOKCASE
PrintMessage 72        (Body is in the way.)
DoneWithTurn
END_COMMAND

COMMAND PULL CHAIR ANY
OBJECTisNumber 258      (Closed door)
OR
OBJECTisNumber 260(Open door)
OR
OBJECTisNumber 232(West Wall)
OR
OBJECTisNumber 234(NorthWall)
OR
OBJECTisNumber 200(Desk)
PrintMessage 73   (You move the $ADJECTIVE$ $NOUN$ to the$OBJECT$)
END_COMMAND

COMMAND PULL CHAIR ANY
NOUNisNumber 226(Office chair)
OBJECTisNumber 258      (Closed door)
OR
OBJECTisNumber 260(Open door)
OR
OBJECTisNumber 232(West Wall)
OR
OBJECTisNumber 234(NorthWall)
OR
OBJECTisNumber 200(Desk)
TurnFlagOFF 26
DoneWithTurn
END_COMMAND

COMMAND PULL CHAIR ANY
PrintMessage 68        (Please specify where to move it to.)
DoneWithTurn
END_COMMAND

COMMAND PULL ANY
PrintMessage 82        (Moving the $NOUN$ is this manner just won't help)
DoneWithTurn
END_COMMAND

COMMAND PULL BODY
ReDirectTo PUSH BODY
END_COMMAND


COMMAND GET ANY
NOT AtLocation 10    (You are not in the office)
NOT NOUNPresent      (NOUN is not here)
PrintMessage 142     (You can't do that, it's not here.)
DoneWithTurn
END_COMMAND

COMMAND GET ANY
NOUNisLocated 203       (Noun is in file drawer)
NOUNisOpen        (trying to make sure it's a folder, otherwise oh well)
PrintMessage 103  (You wouldn't want to carry all the folders...)
DoneWithTurn
END_COMMAND

COMMAND GET ANY
NOUNisCarrying    (You already have it)
PrintMessage 152  (You already have the $noun$)
DoneWithTurn
END_COMMAND

COMMAND GET ALL
PrintMessage 105 (Sorry, you can't do that.)
DoneWithTurn
END_COMMAND

COMMAND GET GUN
Present 302   (Harvey is here.)
PrintMessage 174  (Don't even think about it.)
DoneWithTurn
END_COMMAND

COMMAND GET SECURITY
AtLocation 2
ClearScreen
PrintMessage 160  (You're a good boy and game is over.)
WaitForReturn
EndGame
DoneWithTurn
END_COMMAND

COMMAND GET SECURITY
AtLocation 10
PrintMessage 161  (That might be a good idea, but how?)
DoneWithTurn
END_COMMAND

COMMAND GET BODY
PrintMessage 155  (You can't get it but you might be able to move it.)
DoneWithTurn
END_COMMAND

COMMAND GET RECEIVER
CounterEquals 6 0
PrintMessage 7         (You are now holding the telephone receiver)
GetIt 255              (Receiver)
TurnCounterON 6
DoneWithTurn
END_COMMAND

COMMAND GET PHONE
ReDirectTo GET RECEIVER
END_COMMAND

COMMAND GET FOLDER
NOT Present 284  (Folder is not here yet.)
PrintMessage 166 (Please specify a specific folder.)
DoneWithTurn
END_COMMAND

COMMAND GET FOLDER
NOT Present 284  (Folder is not here yet.)
PrintMessage 104 (File 8 isn't here.)
DoneWithTurn
END_COMMAND

COMMAND GET FOLDER
FlagOFF 24 (Body not yet moved)
PrintMessage 102 (You can't do that while the body is on the bloody folder.)
DoneWithTurn
END_COMMAND

COMMAND GET FOLDER
IsCarrying 288  (you already have Folder 8)
PrintMessage 171 (You already have the bloody folder.)
DoneWithTurn
END_COMMAND

COMMAND GET 8
NOT Present 284  (Folder is not here yet.)
PrintMessage 104 (That folder isn't here yet.)
DoneWithTurn
END_COMMAND

COMMAND GET 8
FlagOFF 24 (Body not yet moved)
PrintMessage 102 (You can't do that while the body is on the bloody folder.)
DoneWithTurn
END_COMMAND

COMMAND GET 8
IsCarrying 284  (you already have the Bloody Folder)
PrintMessage 171 (You already have the bloody folder)
DoneWithTurn
END_COMMAND

COMMAND GET 8
IsCarrying 288  (you already have Folder 8)
PrintMessage 171  (you already have the bloody folder)
DoneWithTurn
END_COMMAND

COMMAND GET HAMLET
IsCarrying 218 (You already have Hamlet)
QuitAllCMDs
END_COMMAND

COMMAND GET HAMLET
FlagOFF 28       (Not standing on office chair)
or
FlagOFF 25       (office chair not at book case.)
PrintMessage 75  (The book is way up high and you can't reach it from here.)
DoneWithTurn
END_COMMAND

COMMAND GET BATTERY
IsNowhere 249  (small key not here yet.)
NOUNisNumber 248  (old battery)
GetIt 248         (You get the old battery)
SendToRoom 249 10 (Put the small key here.)
PrintMessage 65   (As you get the old battery the key falls out...)
DoneWithTurn
END_COMMAND

COMMAND GET TAPE WITH TWEEZERS
IsCarrying 245     (You have the tweezers)
Present 238      (Tape is still here.)
Destroy 238      (Destroys the masking tape)
SendToRoom 239 10(Puts Drawer Scratchings in room.)
TurnFlagON 6     (Tape is now destroyed.)
PrintMessage 58  (You peel the tape away with the tweezers it falls away...)
DoneWithTurn
END_COMMAND

COMMAND GET TAPE WITH TWEEZERS
Present 238 (Tape is here.)
PrintMessage 63   (You don't have the $OBJECT$)
DoneWithTurn
END_COMMAND

COMMAND GET TAPE ANY
Present 238 (Tape is here.)
PrintMessage 59 (Try as you might, you can't grab the corner.)
DoneWithTurn
END_COMMAND

COMMAND GET PAPER WITH SCISSORS
ReDirectTo CUT PAPER WITH SCISSORS
END_COMMAND

COMMAND GET PAPER
FlagOFF 15  (Memo still here.)
PrintMessage 26   (You tear the memo...)
Destroy 253
TurnFlagON 15
DoneWithTurn
END_COMMAND

COMMAND GET EXTENSION
Present 231 (Safe is already here.)
ClearScreen
Tone 800 500     (Alarm goes off)
Tone 400 500
Tone 800 500
Tone 400 500
Tone 800 500
Tone 400 500
PrintMessage 85  (Harvey Comes in...)
END_COMMAND

; *** The following is PartII of above command.

COMMAND GET EXTENSION
Present 231 (Safe is already here.)
Tone 800 500
Tone 400 500
Tone 800 500
Tone 400 500
Tone 800 500
Tone 400 500
WaitForReturn
EndGame
DoneWithTurn
END_COMMAND

COMMAND GET LAMP
Present 231       (Big Safe is here.)
ClearScreen
Tone 800 500     (Alarm goes off)
Tone 400 500
Tone 800 500
Tone 400 500
Tone 800 500
Tone 400 500
PrintMessage 85  (Harvey Comes in...)
END_COMMAND

; *** Tee following is PartII of above command.

COMMAND GET LAMP
Present 231      (Large Safe is here.)
Tone 800 500
Tone 400 500
Tone 800 500
Tone 400 500
Tone 800 500
Tone 400 500
WaitForReturn
EndGame
DoneWithTurn
END_COMMAND

COMMAND GET LAMP
IsCarrying 263    (You already have the lamp)
QuitAllCMDs       (Let AGT inform you of that.)
END_COMMAND

COMMAND GET LAMP
FlagON 10         (Lamp not on table)
FlagOFF 11        (Lamp not on stand)
IsLocated 263 246(Lamp is in extension)
GetIt 246         (you get the extension which has lamp in it.)
PrintMessage 42   (You have the lamp, it's still attached to extension.)
DoneWithTurn
END_COMMAND

COMMAND GET LAMP
FlagON 11         (Lamp on stand)
OR
FlagOFF 10        (Lamp on table.)
IsLocated 246 241       (Extension is in Outlet)
IsLocated 263 246       (Cord is in extension)
TurnFlagON 10               (Lamp is no longer on end table.)
TurnFlagOFF 11              (Lamp is no longer on plant stand.)
PrintMessage 40         (As you take the lamp the extension comes out of...)
GetIt 246               (You get the extension which has lamp in it)
DoneWithTurn            (Does not allow AGT to give you the lamp)
END_COMMAND

COMMAND GET LAMP
FlagOFF 10                  (Lamp is on end table.)
IsLocated 263 241       (Cord is in outlet)
PrintMessage 41         (As you take the lamp the cord comes out of...)
TurnFlagON 10               (Lamp is no longer on end table)
QuitAllCMDs             (Let AGT give you the lamp.)
END_COMMAND

COMMAND GET LAMP
FlagON 10         (Lamp not on table)
FlagOFF 11        (Lamp not on stand)
QuitAllCMDs       (Let AGT give you the lamp)
END_COMMAND



COMMAND GET CHAIR
NOUNisNumber 226 (Office Chair)
PrintMessage 154 (It's too heavy to get, but you could push it.)
DoneWithTurn
END_COMMAND

COMMAND LIFT TABLE
ReDirectTo UNDER TABLE
END_COMMAND

COMMAND DIAL PHONE
IsCarrying 255 (Has receiver)
FlagOFF 255
PrintMessage 4 (a number would be helpful)
DoneWithTurn
END_COMMAND

COMMAND DIAL ANY
IsCarrying 255
FlagON 255
PrintMessage 5 (You're already connected to someone, Dummy!)
DoneWithTurn
END_COMMAND

COMMAND DIAL 0101
IsCarrying 255 (Receiver is picked up)
CounterGT 1 0   (Katz is on way up)
OR
CounterGT 2 0  (Harvey is on way up)
Tone 100 200
Tone 0 100
Tone 100 200
Tone 0 100
Tone 100 200
Tone 0 100
PrintMessage 124 (Line seems to be busy)
END_COMMAND


; ***** Following is PART II of above command

COMMAND DIAL 0101
IsCarrying 255 (Receiver is picked up)
CounterGT 1 0    (Katz is on way up)
OR
CounterGT 2 0    (Harvey is on way up)
Tone 100 200
Tone 0 100
Tone 100 200
Tone 0 100
Tone 100 200
DoneWithTurn
END_COMMAND

COMMAND DIAL 0101
IsCarrying 255 (Receiver is picked up)
Tone 50 800
Delay 2
Tone 50 800
Delay 2
Tone 50 800
Delay 2
TurnFlagON 255 (On phone with Security)
END_COMMAND

; ************PART II of Above

COMMAND DIAL 0101
IsCarrying 255 (Receiver is picked up)
ClearScreen
BlankLine
AskQuestion 2  (Security.  What do you need?)
BlankLine
AnswerIsCorrect (said the word KATZ)
BlankLine
BlankLine
PrintMessage 121 (Look, I'll send up Chief Officer Katz right away.)
TurnCounterON 1  (Katz on way up)
TurnFlagOFF 255  (No longer on phone with security)
DoneWithTurn
END_COMMAND

COMMAND DIAL 0101
IsCarrying 255   (holding receiver)
BlankLine
BlankLine
AskQuestion 3   (I'm sorry?  Who do you need?)
BlankLine
AnswerIsCorrect (said the word KATZ)
BlankLine
BlankLine
PrintMessage 121 (Look, I'll send up Chief Officer Katz right away.)
TurnCounterON 1  (Katz on way up)
TurnFlagOFF 255  (No longer on phone with security)
DoneWithTurn
END_COMMAND

COMMAND DIAL 0101
IsCarrying 255   (holding receiver)
BlankLine
BlankLine
PrintMessage 120 ("Look, I'll send somebody up right away - CLICK)
TurnFlagOFF 255  (Security hangs up on you.)
TurnCounterON 2  (Harvey will be here in 5 moves.)
DoneWithTurn
END_COMMAND

COMMAND DIAL 8372
IsCarrying 255 (Receiver is picked up)
Tone 50 800
Delay 2
Tone 50 800
Delay 2
Tone 50 800
Delay 2
PrintMessage 1 (Maintenance. Nobody available)
TurnFlagON 255
DoneWithTurn
END_COMMAND

COMMAND DIAL ANY
IsCarrying 255 (Receiver is picked up)
Tone 50 800
Delay 2
Tone 50 800
Delay 2
Tone 50 800
Delay 2
Tone 50 800
Delay 2
PrintMessage 2 (No answer...not everyone works all night.)
DoneWithTurn
END_COMMAND

COMMAND DIAL PHONE
PrintMessage 165 (Picking up the receiver might be helpful...)
DoneWithTurn
END_COMMAND

COMMAND DIAL ANY
PrintMessage 165  (Picking up the receiver might be helpful...)
DoneWithTurn
END_COMMAND

; *** KEEPS YOU FROM EXAMINING A DECOY NOUN

COMMAND EXAMINE ANY
NOUNisNumber 298 (one of the decoy nouns)
OR
NOUNisNumber 297 (one of the decoy nouns)
OR
NOUNisNumber 296 (one of the decoy nouns)
PrintMessage 142 (You can't do that because it's not here.)
DoneWithTurn
END_COMMAND

COMMAND EXAMINE ANY
NOT AtLocation 10       (Not in office)
NOT NOUNPresent         (Noun is not here.)
PrintMessage 142        (You can't do that, because it's not here.)
DoneWithTurn
END_COMMAND

COMMAND EXAMINE BODY
FlagON 24         (Body has been moved)
PrintMessage 175  (Shannon is now a bloody mess)
END_COMMAND

COMMAND EXAMINE BODY
FlagON 24
NOT IsCarrying 210 (Body's badge)
NOT IsWearing 210  (Body's badge)
Present 210            (Body's badge)
IsLocated 210 10       (Body's badge is in office)
PrintMessage 176   (A badge is attached to the body...)
DoneWithTurn
END_COMMAND

COMMAND EXAMINE BODY
FlagON 24
NOT IsCarrying 211 (Your badge)
NOT IsWearing 211  (Your badge)
Present 211            (Your badge)
IsLocated 211 10       (Your badge is in office)
PrintMessage 176   (A badge is attached to the body...)
DoneWithTurn
END_COMMAND


COMMAND EXAMINE BODY
FlagOFF 24             (Body not moved yet)
NOT IsCarrying 210 (Body's badge)
NOT IsWearing 210  (Body's badge)
Present 210            (Body's badge)
IsLocated 210 10       (Body's badge is in office)
DescribeThing 299  (Dead body)
PrintMessage 176   (A badge is attached to the body...)
DoneWithTurn
END_COMMAND

COMMAND EXAMINE BODY
FlagOFF 24             (Body not moved yet)
NOT IsCarrying 211 (Your badge)
NOT IsWearing 211  (Your badge)
Present 211            (Your badge)
IsLocated 211 10       (Your badge is in office)
DescribeThing 299  (Dead body)
PrintMessage 176   (A badge is attached to the body...)
DoneWithTurn
END_COMMAND

COMMAND EXAMINE FOLDER
NOT Present 284  (Folder is not here yet.)
PrintMessage 166 (Please specify a specific folder.)
DoneWithTurn
END_COMMAND

COMMAND EXAMINE TYPEWRITER
IsLocated 251 250  (Suicide note is in typewriter)
PrintMessage 146   (The smith&Corona has a note in it...)
DoneWithTurn
END_COMMAND

COMMAND EXAMINE TYPEWRITER
IsLocated 230 250  (Typing test is in typewriter)
PrintMessage 147   (The Smith&Corona has blank stationery that's typed on..)
DoneWithTurn
END_COMMAND

COMMAND EXAMINE TYPEWRITER
IsLocated 271 250  (Blank stationery is in typewriter)
PrintMessage 148   (Blank stationery sits in the old Smith & Corona.)
DoneWithTurn
END_COMMAND

COMMAND EXAMINE FOLDER
NOT Present 284  (Folder is not here yet.)
PrintMessage 104 (File 8 isn't here.)
DoneWithTurn
END_COMMAND

COMMAND EXAMINE FOLDER
FlagOFF 24 (Body not yet moved)
PrintMessage 102 (You can't do that while the body is on the bloody folder.)
DoneWithTurn
END_COMMAND


COMMAND EXAMINE SAFE
IsOpen 231  (Safe is open)
ShowContents 231 (Show what's in the safe.)
DoneWithTurn
END_COMMAND

COMMAND EXAMINE TABLE
Present 231 (The safe is now here.)
DescribeThing 231 (Describe the safe instead.)
DoneWithTurn
END_COMMAND

COMMAND EXAMINE DRAWER
NOUNisNumber 204(Top-Left Drawer)
IsOpen 204  (Top-Left Drawer is open)
PrintMessage 90   (Drawer is empty)
DoneWithTurn
END_COMMAND

COMMAND EXAMINE HAMLET
IsCarrying 218  (You already have hamlet)
QuitAllCMDs
END_COMMAND

COMMAND EXAMINE HAMLET
FlagOFF 25     (Office chair is NOT at Bookcase.)
OR
FlagOFF 28     (You are NOT Standing on office chair.)
PrintMessage 75        (You can't reach it from here.)
DoneWithTurn           
END_COMMAND


; ************  The Paper Shredder and all that happens with it.

COMMAND EXAMINE SHREDDER
FlagOFF 15  (Memo still here)
PrintMessage 21 (There is a memo in the shredder...)
DoneWithTurn
END_COMMAND

COMMAND EXAMINE BUTTON
NOT NOUNisNumber 259    (Noun is not the Shredder Button)
Present 269
PrintMessage 89
DoneWithTurn
END_COMMAND

COMMAND EXAMINE BUTTON
FlagOFF 15  (Memo still here)
PrintMessage 22   (The button is flashing as if there is a jam...)
DoneWithTurn
END_COMMAND

COMMAND EXAMINE BUTTON
FlagON 15   (Memo is destroyed)
PrintMessage 23 (The button is now off...)
DoneWithTurn
END_COMMAND

COMMAND EXAMINE DOOR
NOUNisNumber 234 (Door in Hallway)
or
NOUNisNumber 258 (Open Door)
or
NOUNisNumber 260 (Closed Door)
QuitAllCMDs
DoneWithTurn
END_COMMAND



COMMAND EXAMINE BUTTONS
NOT Present 256
PrintMessage 144 (What buttons?)
DoneWithTurn
END_COMMAND


COMMAND EXAMINE GUN
IsOpen 209  (Gun is now open)
PrintMessage 61   (The chamber is open)
DoneWithTurn
END_COMMAND

COMMAND EXAMINE LAMP
FlagOFF 10        (Lamp is on End Table)
PrintMessage 62   (The lamp is on the end table)
END_COMMAND

COMMAND EXAMINE LAMP
FlagON 11         (Lamp is on the plant stand)
PrintMessage 64   (The lamp is on the plant stand)
END_COMMAND

COMMAND EXAMINE OFFICE
FlagOFF 10        (Lamp is on end table)
DescribeThing 214  (Describe Office)
PrintMessage 177  (A porcelain lamp sits on the end table...)
DoneWithTurn
END_COMMAND

COMMAND EXAMINE OFFICE
FlagON 11         (Lamp is on plant stand)
DescribeThing 214  (Describe office)
PrintMessage 178   (A porcelain lamp sits on the plant stand...)
DoneWithTurn
END_COMMAND

COMMAND EXAMINE OFFICE
NOT IsCarrying 263  (The table lamp)
DescribeThing 214  (Describe Office)
PrintMessage 179   (A table lamp is here.)
DoneWithTurn
END_COMMAND

COMMAND EXAMINE OFFICE
DescribeThing 214  (Describe Office)
DoneWithTurn
END_COMMAND

COMMAND LOOK
ReDirectTo EXAMINE OFFICE
END_COMMAND

; *** KEEPS YOU FROM CUTTING A DECOY NOUN

COMMAND CUT ANY
NOUNisNumber 298 (one of the decoy nouns)
OR
NOUNisNumber 297 (one of the decoy nouns)
OR
NOUNisNumber 296 (one of the decoy nouns)
PrintMessage 142 (You can't do that because it's not here.)
DoneWithTurn
END_COMMAND

COMMAND CUT ANY
NOT AtLocation 10       (Not in office)
NOT NOUNPresent         (Noun is not here.)
PrintMessage 142        (You can't do that, because it's not here.)
DoneWithTurn
END_COMMAND


COMMAND CUT PAPER WITH SCISSORS
FlagOFF 15  (Memo still here)
IsCarrying 244  (Has scissors)
TurnFlagON 15 (Memo now not in shredder)
PrintMessage 27 (You take the memo...)
GetIt 253         (You now have the shredded memo)
DoneWithTurn
END_COMMAND


; *** KEEPS YOU FROM READING A DECOY NOUN

COMMAND READ ANY
NOUNisNumber 298 (one of the decoy nouns)
OR
NOUNisNumber 297 (one of the decoy nouns)
OR
NOUNisNumber 296 (one of the decoy nouns)
PrintMessage 142 (You can't do that because it's not here.)
DoneWithTurn
END_COMMAND


COMMAND READ ANY
NOT AtLocation 10       (Not in office)
NOT NOUNPresent         (Noun is not here.)
PrintMessage 142        (You can't do that, because it's not here.)
DoneWithTurn
END_COMMAND

COMMAND READ ANY
Present 303  (Katz is here.)
PrintMessage 134 (Please don't read to me.  If you have evidence give it...)
DoneWithTurn
END_COMMAND

COMMAND READ ANY
Present 302  (Harvey is here.)
PrintMessage 170 (Don't to me buddy...)
DoneWithTurn
END_COMMAND

COMMAND READ ENTRIES
IsOpen 218        (Have opened Hamlet)
PrintMessage 159  (Which entry...)
DoneWithTurn
END_COMMAND


COMMAND READ PAGE
IsOpen 218 (Hamlet is open)
TurnFlagON 60    (Title page has been read)
END_COMMAND


COMMAND READ FOLDER
NOT Present 284  (Folder is not here yet.)
PrintMessage 166 (Please specify a specific folder.)
DoneWithTurn
END_COMMAND

COMMAND READ FOLDER
FlagOFF 24 (Body not yet moved)
PrintMessage 102 (You can't do that while the body is on the bloody folder.)
DoneWithTurn
END_COMMAND

COMMAND READ FOLDER 8
NOT Present 284  (Folder is not here yet.)
PrintMessage 104  (THat folder isn't here.)
DoneWithTurn
END_COMMAND

COMMAND READ FOLDER 8
FlagON 24  (Body has been moved)
PrintMessage 167   (The folder is too bloody and impossible to read...)
DoneWithTurn
END_COMMAND

COMMAND READ FOLDER 8
PrintMessage 102  (You can't do that while the body is on it.)
DoneWithTurn
END_COMMAND

COMMAND READ PAPER
NOT IsCarrying 253      (Haven't gotten the paper from shredder yet)
Present 253
PrintMessage 28         (You can't read the memo from here...)
DoneWithTurn
END_COMMAND

COMMAND READ SCRATCHINGS
NOUNisNumber 240 (Top-left scratchings)
TurnFlagON 55 (Has read t.l. scratchings)
END_COMMAND

COMMAND READ SCRATCHINGS
NOUNisNumber 239 (Drawer scratchings)
TurnFlagON 56     (Has read drawer scratchings)
END_COMMAND

COMMAND READ HAMLET
IsOpen 218  (Hamlet is open)
PrintMessage 99 (When you open the copy of Hamlet, it's ajournal...)
DoneWithTurn
END_COMMAND

COMMAND READ HAMLET
NOT IsCarrying 218 (Don't have it yet.)
ReDirectTo EXAMINE HAMLET
END_COMMAND
 
; ************  Following deals with shooting the gun.

COMMAND FIRE GUN
IsCarrying 209   (Has gun)
PrintMessage 20  (-Click-)
DoneWithTurn
END_COMMAND

; *** KEEPS YOU FROM TURNING A DECOY NOUN

COMMAND TURN ANY
NOUNisNumber 298 (one of the decoy nouns)
OR
NOUNisNumber 297 (one of the decoy nouns)
OR
NOUNisNumber 296 (one of the decoy nouns)
PrintMessage 142 (You can't do that because it's not here.)
DoneWithTurn
END_COMMAND

COMMAND TURN ANY
NOT NOUNPresent         (Noun is not here.)
PrintMessage 142        (You can't do that, because it's not here.)
DoneWithTurn
END_COMMAND

COMMAND TURN RADIO
Present 247       (Radio is here.)
IsLocated 242 247 (New Battery is in radio)
PrintMessage 87   (The radio plays and then you turn it off.)
DoneWithTurn
END_COMMAND

COMMAND TURN RADIO
Present 247       (Radio is here.)
IsLocated 248 247 (Old Battery is in radio)
PrintMessage 88   (Static then it dies.)
DoneWithTurn
END_COMMAND

COMMAND TURN RADIO
PrintMessage 30   (Nothing seems to happen.)
DoneWithTurn
END_COMMAND

COMMAND TURN TABLE
Present 228      (Table is still here.)
FlagOFF 10           (Lamp is on table)
ReDirectTo UNDER TABLE 
END_COMMAND

COMMAND TURN TABLE
Present 228      (Table is still here.)
FlagON 11      (Lamp is on stand)
FlagON 35      (Lamp is "ON")
PrintMessage 86  (You turn the table and discover the safe.)
SendToRoom 231 10   (Large Safe)
SendToRoom 256 10  (Steel door)
SendToRoom 265 10  (Button A5)
SendToRoom 266 10  (Button B2)
SendToRoom 267 10  (Button C3)
SendToRoom 268 10  (Button D1)
SendToRoom 269 10   (Safe Buttons {decoys in case they ex buttons})
END_COMMAND

; *** The following is PartII of the above command.

COMMAND TURN TABLE
Present 228      (Table is still here.)
FlagON 11      (Lamp is on stand)
FlagON 35      (Lamp is "ON")
Destroy 228      (send Table to Room 0)
DoneWithTurn
END_COMMAND

COMMAND TURN TABLE
ClearScreen
Tone 800 500     (Alarm goes off)
Tone 400 500
Tone 800 500
Tone 400 500
Tone 800 500
Tone 400 500
PrintMessage 85  (Harvey Comes in...)
END_COMMAND

; *** Tee following is PartII of above command.

COMMAND TURN TABLE
Tone 800 500
Tone 400 500
Tone 800 500
Tone 400 500
Tone 800 500
Tone 400 500
WaitForReturn
EndGame
DoneWithTurn
END_COMMAND


; ************* Turning the light on and off

COMMAND TURN SWITCH
Present 237               (OFF light is here.)
SwapLocations 237 264    (Now ON light is here.)
PrintMessage 43          (The light is now on)
DoneWithTurn
END_COMMAND

COMMAND TURN SWITCH
Present 264             (ON light is here.)
SwapLocations 264 237    (Now OFF light is here.)
PrintMessage 44          (The light is now off...)
DoneWithTurn
END_COMMAND

; *** KEEPS YOU FROM CLOSING A DECOY NOUN

COMMAND CLOSE ANY
NOUNisNumber 298 (one of the decoy nouns)
OR
NOUNisNumber 297 (one of the decoy nouns)
OR
NOUNisNumber 296 (one of the decoy nouns)
PrintMessage 142 (You can't do that because it's not here.)
DoneWithTurn
END_COMMAND

COMMAND CLOSE ANY
NOT AtLocation 10       (Not in office)
NOT NOUNPresent         (Noun is not here.)
PrintMessage 142        (You can't do that, because it's not here.)
DoneWithTurn
END_COMMAND

COMMAND CLOSE SAFE
Present 231       (Safe is here.)
CloseIt 256       (Close Safe door also)
SetVariableTo 1 0  (Reset Button pushing variable)
TurnFlagOFF 53   (The flag that had to be ON to open safe)
QuitAllCMDs
END_COMMAND

COMMAND CLOSE DOOR
AtLocation 2 (In hallway)
ChangePassageway 3 0
QuitAllCMDs
END_COMMAND

COMMAND CLOSE DOOR
Present 231 (Safe is here.)
NOUNisNumber 256  (Safe door)
CloseIt 231       (Close safe also)
SetVariableTo 1 0 (Reset Buttons pushing variable.)
QuitAllCMDs
END_COMMAND

COMMAND CLOSE DOOR
Present 260       (Open Door is here.)
SwapLocations 260 258   (Put closed door here.)
ChangePassageway 4 0    
PrintMessage 19         (Door is now shut...)
DoneWithTurn
END_COMMAND

COMMAND CLOSE ANY
NOUNIsClosed
QuitAllCMDs
END_COMMAND

COMMAND CLOSE DRAWER
NOUNisNumber 202         (Top Drawer)
IsOpen 205               (Bottom-Left is open as well)
CloseIt 205              (Close Bottom-Left)
CloseIt 202              (Close Top Drawer)
TurnCounterOFF 5         (Reset Top Drawer counter)
TurnFlagOFF 5            (Bottom-Left is closed)
PrintMessage 46
DoneWithTurn
END_COMMAND

COMMAND CLOSE DRAWER
NOUNisNumber 202         (Top Drawer)
TurnCounterOFF 5         (Reset Top Drawer counter)
TurnFlagOFF 5
END_COMMAND

COMMAND CLOSE DRAWER
NOUNisNumber 205         (Bottom-Left Drawer)
CloseIt 205              (Close Bottom-Left Drawer)
CloseIt 202              (Close Top Drawer)
TurnCounterOFF 5         (Top Drawer counter is reset)
TurnFlagOFF 5            (Bottom-Left Drawer is closed)
PrintMessage 46          (The Top Drawer and Bottom-Left door shut...)
DoneWithTurn
END_COMMAND

; *** KEEPS YOU FROM OPENING A DECOY NOUN

COMMAND OPEN ANY
NOUNisNumber 298 (one of the decoy nouns)
OR
NOUNisNumber 297 (one of the decoy nouns)
OR
NOUNisNumber 296 (one of the decoy nouns)
PrintMessage 142 (You can't do that because it's not here.)
DoneWithTurn
END_COMMAND

COMMAND OPEN ANY
NOT AtLocation 10       (Not in office)
NOT NOUNPresent         (Noun is not here.)
PrintMessage 142        (You can't do that, because it's not here.)
DoneWithTurn
END_COMMAND

COMMAND OPEN FOLDER
NOT Present 284  (Folder is not here yet.)
PrintMessage 166 (Please specify a specific folder.)
DoneWithTurn
END_COMMAND

COMMAND OPEN SAFE
Present 231 (Safe is here.)
IsClosed 231      (Safe is closed)
PrintMessage 97 (You'll have to try harder than that.)
DoneWithTurn
END_COMMAND

COMMAND OPEN PANEL
IsClosed 233 (Panel is closed.)
PrintMessage 97 (You'll have to try harder than that.)
DoneWithTurn
END_COMMAND

COMMAND OPEN DOOR
AtLocation 2 (In Hallway)
ChangePassageway 3 10
QuitAllCMDs
END_COMMAND

COMMAND OPEN DOOR
Present 231  (Safe is here.)
NOUNisNumber 256 (Safe door)
PrintMessage 97 (You'll have to try harder than that.)
DoneWithTurn
END_COMMAND

COMMAND OPEN DOOR
Present 258       (Closed door is here.)
NOUNisNumber 258 (Office Door)
SwapLocations 258 260   (Put open door here.)
ChangePassageway 4 2
PrintMessage 29         (Door is now open...)
DoneWithTurn
END_COMMAND

COMMAND OPEN DRAWER
NOUNisNumber 202         (Top Drawer)
TurnCounterON 5          (Top Drawer counter is now going)
TurnFlagON 5             (Top Drawer is open)
END_COMMAND

COMMAND OPEN DRAWER
NOUNisNumber 205         (Bottom-Left)
FlagOFF 5                (Top Drawer is closed)
PrintMessage 48          (The Drawer seems to be locked)
DoneWithTurn
END_COMMAND

; *** KEEPS YOU FROM LOCKING A DECOY NOUN

COMMAND LOCK ANY
NOUNisNumber 298 (one of the decoy nouns)
OR
NOUNisNumber 297 (one of the decoy nouns)
OR
NOUNisNumber 296 (one of the decoy nouns)
PrintMessage 142 (You can't do that because it's not here.)
DoneWithTurn
END_COMMAND

COMMAND LOCK DOOR
PrintMessage 50
DoneWithTurn
END_COMMAND

; *** KEEPS YOU FROM UNLOCKING A DECOY NOUN

COMMAND UNLOCK ANY
NOUNisNumber 298 (one of the decoy nouns)
OR
NOUNisNumber 297 (one of the decoy nouns)
OR
NOUNisNumber 296 (one of the decoy nouns)
PrintMessage 142 (You can't do that because it's not here.)
DoneWithTurn
END_COMMAND


COMMAND UNLOCK ANY
NOT AtLocation 10       (Not in office)
NOT NOUNPresent         (Noun is not here.)
PrintMessage 142        (You can't do that, because it's not here.)
DoneWithTurn
END_COMMAND

COMMAND UNLOCK DRAWER
NOUNisNumber 205         (Bottom-Left)
PrintMessage 49          (There is no keyhole on the drawer...)
DoneWithTurn
END_COMMAND

COMMAND UNLOCK DRAWER
NOUNisNumber 204 (Top-Left)
IsCarrying 249         (Has the small key)
QuitAllCMDs      (Let AGT unlock the top-left drawer)
END_COMMAND

COMMAND UNLOCK DRAWER
NOUNisNumber 204 (Top-left)
PrintMessage 50        (I think you need a key...)
DoneWithTurn
END_COMMAND

COMMAND UNLOCK PANEL
IsClosed 233 (Panel is closed.)
PrintMessage 97 (You'll have to try harder than that.)
DoneWithTurn
END_COMMAND

COMMAND UNLOCK ANY
PrintMessage 51        (I don't think that unlocking the $NOUN$ is answer..)
DoneWithTurn
END_COMMAND

; *************** These deal with the UNDER commands.

; *** KEEPS YOU FROM UNDERING A DECOY NOUN

COMMAND UNDER ANY
NOUNisNumber 298 (one of the decoy nouns)
OR
NOUNisNumber 297 (one of the decoy nouns)
OR
NOUNisNumber 296 (one of the decoy nouns)
PrintMessage 142 (You can't do that because it's not here.)
DoneWithTurn
END_COMMAND

COMMAND UNDER ANY
NOT AtLocation 10       (Not in office)
NOT NOUNPresent         (Noun is not here.)
PrintMessage 142        (You can't do that, because it's not here.)
DoneWithTurn
END_COMMAND

COMMAND UNDER FOLDER
NOT Present 284  (Folder is not here yet.)
PrintMessage 166 (Please specify a specific folder.)
DoneWithTurn
END_COMMAND

COMMAND UNDER BODY
FlagOFF 24        (Body has not been moved yet.)
PrintMessage 101 (Besides a lot of blood, you spy the corner of a folder...)
SendToRoom 284 10
DoneWithTurn
END_COMMAND

COMMAND UNDER TABLE
Present 228      (The table is still here.)
FlagOFF 10         (Lamp is on table)
PrintMessage 84  (Lamp crashes to the floor!!!)
Delay 4
ClearScreen
PrintMessage 85  (Officer Harvey runs in...)
WaitForReturn
EndGame
DoneWithTurn
END_COMMAND

COMMAND UNDER TABLE
Present 228      (Table is still here.)
PrintMessage 83  (The table is much heavier then you thought it would be..)
DoneWithTurn
END_COMMAND

COMMAND UNDER DRAWER
NOUNisNumber 202       (Top Drawer)
NOT Present 238        (The Tape is not here yet.)
FlagOFF 6              (Tape Not destroyed yet.) 
SendToRoom 238 10      (Put Masking tape in room)
PrintMessage 52        (There is a piece of masking tape here.)
DoneWithTurn
END_COMMAND

COMMAND UNDER DRAWER
NOUNisNumber 202       (Top Drawer)
Present 238            (Masking tape is here.)
PrintMessage 52        (There is a piece of masking tape here.)
DoneWithTurn
END_COMMAND

COMMAND UNDER DRAWER
NOUNisNumber 202       (Top Drawer)
PrintMessage 54        (There is some scratchings here...)
DoneWithTurn
END_COMMAND

COMMAND UNDER DRAWER
NOUNisNumber 204       (Top-Left)
IsOpen 204             (Top-Left is open)
IsOpen 205             (Bottom-Left is open)
PrintMessage 53        (You can't see under the T.L. drawer at the moment.)
DoneWithTurn
END_COMMAND

COMMAND UNDER DRAWER
NOUNisNumber 204       (Top-Left)
IsOpen 204             (Top-Left is open)
PrintMessage 54        (There is some scratchings here.)
DoneWithTurn
END_COMMAND

COMMAND UNDER DRAWER
NOUNisNumber 204       (Top-Left)
PrintMessage 53        (You can't see under the T.L. Drawer at the moment.)
DoneWithTurn
END_COMMAND

COMMAND UNDER TAPE
Present 238      (Tape is still here.)
PrintMessage 60  (The tape is stuck to the bottom of the drawer.)
DoneWithTurn
END_COMMAND

COMMAND UNDER ANY
PrintMessage 55        (You see nothing of interest under the $ADJ$ $NOUN$)
DoneWithTurn
END_COMMAND

; *** KEEPS YOU FROM BEHINDING A DECOY NOUN

COMMAND BEHIND ANY
NOUNisNumber 298 (one of the decoy nouns)
OR
NOUNisNumber 297 (one of the decoy nouns)
OR
NOUNisNumber 296 (one of the decoy nouns)
PrintMessage 142 (You can't do that because it's not here.)
DoneWithTurn
END_COMMAND

COMMAND BEHIND ANY
NOT AtLocation 10       (Not in office)
NOT NOUNPresent         (Noun is not here.)
PrintMessage 142        (You can't do that, because it's not here.)
DoneWithTurn
END_COMMAND

COMMAND BEHIND FOLDER
NOT Present 284  (Folder is not here yet.)
PrintMessage 166 (Please specify a specific folder.)
DoneWithTurn
END_COMMAND


COMMAND BEHIND ANY
PrintMessage 56        (You see nothing of int. behind the $ADJ$ $NOUN$)
DoneWithTurn
END_COMMAND

; *** KEEPS YOU FROM ABOVING A DECOY NOUN

COMMAND ABOVE ANY
NOUNisNumber 298 (one of the decoy nouns)
OR
NOUNisNumber 297 (one of the decoy nouns)
OR
NOUNisNumber 296 (one of the decoy nouns)
PrintMessage 142 (You can't do that because it's not here.)
DoneWithTurn
END_COMMAND

COMMAND ABOVE ANY
NOT AtLocation 10       (Not in office)
NOT NOUNPresent         (Noun is not here.)
PrintMessage 142        (You can't do that, because it's not here.)
DoneWithTurn
END_COMMAND

COMMAND ABOVE FOLDER
NOT Present 284  (Folder is not here yet.)
PrintMessage 166 (Please specify a specific folder.)
DoneWithTurn
END_COMMAND

COMMAND ABOVE ANY
PrintMessage 57        (You see nothing of int. above the $ADJ$ $NOUN$)
DoneWithTurn
END_COMMAND

COMMAND REPLACE BATTERY
IsNowhere  249           (Small key is in room 0)
IsCarrying 247           (radio)
IsCarrying 242           (New battery)
SwapLocations 248 242   (Swap old battery for new battery)
SendToRoom 249 10          (drop the small key here.)
PrintMessage 65         (AS you get the old battery, small object falls...)
DoneWithTurn
END_COMMAND

COMMAND REPLACE BATTERY
PrintMessage 67     (You are not carrying either the battery or the radio)
DoneWithTurn
END_COMMAND

; *** KEEPS YOU FROM SITTING ON A DECOY NOUN

COMMAND SIT ANY
NOUNisNumber 298 (one of the decoy nouns)
OR
NOUNisNumber 297 (one of the decoy nouns)
OR
NOUNisNumber 296 (one of the decoy nouns)
PrintMessage 142 (You can't do that because it's not here.)
DoneWithTurn
END_COMMAND

COMMAND SIT ANY
NOT AtLocation 10       (Not in office)
NOT NOUNPresent         (Noun is not here.)
PrintMessage 142        (You can't do that, because it's not here.)
DoneWithTurn
END_COMMAND

COMMAND SIT ON CHAIR
OBJECTisNumber 227       (Desk Chair)
FlagOFF 27             (Chair not oiled yet.)
PrintMessage 76        (You sit on it makes a small squeek.)
DoneWithTurn
END_COMMAND

COMMAND SIT ANY
PrintMessage 77        (You are now sitting on the $ADJECTIVE$ $NOUN$.)
TurnFlagON 29         (Now Sitting)
DoneWithTurn
END_COMMAND

; *** KEEPS YOU FROM STANDING ON A DECOY NOUN

COMMAND STAND ANY
NOUNisNumber 298 (one of the decoy nouns)
OR
NOUNisNumber 297 (one of the decoy nouns)
OR
NOUNisNumber 296 (one of the decoy nouns)
PrintMessage 142 (You can't do that because it's not here.)
DoneWithTurn
END_COMMAND

COMMAND STAND ANY
NOT AtLocation 10       (Not in office)
NOT NOUNPresent         (Noun is not here.)
PrintMessage 142        (You can't do that, because it's not here.)
DoneWithTurn
END_COMMAND

COMMAND STAND ON CHAIR
NOUNisNumber 227       (Desk chair)
PrintMessage 91        (You fall off the chair...)
DoneWithTurn
END_COMMAND

COMMAND STAND ON CHAIR
NOUNisNumber 226       (Office Chair)
TurnFlagON 28          (You are standing on office chair.)
PrintMessage 78        (You are now standing on the office chair.)
DoneWithTurn 
END_COMMAND

COMMAND STAND ANY
PrintMessage 79        (I don't think it's a good idea.)
DoneWithTurn
END_COMMAND

COMMAND OIL ANY
NOT AtLocation 10       (Not in office)
NOT NOUNPresent         (Noun is not here.)
PrintMessage 142        (You can't do that, because it's not here.)
DoneWithTurn
END_COMMAND

COMMAND OIL CHAIR
NOUNisNumber 227     (Desk Chair)
IsCarrying 243         (You have the WD40)
PrintMessage 156        (You spray oil and the $noun$ is now quite.)
TurnFlagON 27          (Desk chair is now oiled.)
DoneWithTurn
END_COMMAND

COMMAND OIL ANY
IsCarrying 243         (You have the WD40)
PrintMessage 156       (You spray oil and $noun$ is now quiet)
DoneWithTurn
END_COMMAND

COMMAND OIL ANY
PrintMessage 157        (You don't have anything to $VERB$ the $NOUN$ with)
DoneWithTurn
END_COMMAND

COMMAND FEEL ANY
NOT AtLocation 10       (Not in office)
NOT NOUNPresent         (Noun is not here.)
PrintMessage 142        (You can't do that, because it's not here.)
DoneWithTurn
END_COMMAND

COMMAND FEEL SWITCH
Present 237 (Off light is here.)
PrintMessage 100  (Feeling around in the darkness, you find a...)
DoneWithTurn
END_COMMAND

COMMAND FEEL WALL
Present 237(Off light is here.)
PrintMessage 100  (Feeling around in the darkness, you find a...)
DoneWithTurn
END_COMMAND

COMMAND TYPE ANY
NOT AtLocation 10       (Not in office)
NOT NOUNPresent         (Noun is not here.)
PrintMessage 142        (You can't do that, because it's not here.)
DoneWithTurn
END_COMMAND

COMMAND TYPE ANY
IsOpen 231     (Safe is open)
NOT OBJECTisNumber 233 (Panel)
PrintMessage 136 (Are you trying to enter the password?)
PromptForYES
PrintMessage 116 (Then please phrase as...)
DoneWithTurn
END_COMMAND

COMMAND TYPE ANY ON PANEL
IsOpen 233 (Panel is open)
PrintMessage 115 (The panel is already open)
DoneWithTurn
END_COMMAND


COMMAND TYPE ANY ON PANEL
IsClosed 231   (Safe not open)
PrintMessage 105 (There is no where to do that)
DoneWithTurn
END_COMMAND

COMMAND TYPE ANY ON PANEL
NOT NOUNisNumber 272
Tone 1005 300
Tone 0 100
Tone 1755 300
Tone 0 100
Tone 1200 300
Tone 0 100
Tone 1400 300
Tone 0 100
END_COMMAND

; ***** PART II

COMMAND TYPE ANY ON PANEL
NOT NOUNisNumber 272
Tone 1600 300
Tone 0 100
Tone 1800 300
ClearScreen
Delay 2
PrintMessage 30 (Nothing seems to happen.)
DoneWithTurn
END_COMMAND

COMMAND TYPE NIBBLE ON PANEL
Tone 1400 300
Tone 0 100
Tone 1200 300
Tone 0 100
Tone 1700 300
Tone 0 100
Tone 1700 300
Tone 0 100
END_COMMAND

; **** PART II of ABOVE

COMMAND TYPE NIBBLE ON PANEL
Tone 1600 300
Tone 0 100
Tone 1500 300
ClearScreen 
Delay 3
Tone 2000 500
PrintMessage 106 (The Inner Panel opens...)
OpenIt 233 (Inner panel opens)
DoneWithTurn
END_COMMAND


COMMAND TYPE ANY ON ANY
NOT IsLocated 271 250  (Blank STat. is not in typewriter)
NOT OBJECTisNumber 271 (Blank Stationery)
NOT OBJECTisNumber 250 (Typewriter)
PrintMessage 109  (Tampering with evidence)
DoneWithTurn
END_COMMAND

COMMAND TYPE ANY ON ANY
NOT OBJECTisNumber 271 (Blank Stationery)
PrintMessage 107 (It might be better to type on something like paper)
DoneWithTurn
END_COMMAND


COMMAND TYPE ANY ON ANY
IsLocated 271 250 (Blank Stationery is in typewriter.)
OBJECTisNumber 271   (Blank Stationery)
SwapLocations 271 230  (Swap Blank Stationery for Typing test)
PrintMessage 108   (You type a typing test...)
DoneWithTurn
END_COMMAND

COMMAND TYPE ANY ON ANY
OBJECTisNumber 271  (Blank Stationery.)
PrintMessage 110       (The blank stationery is not in the typewriter)
DoneWithTurn
END_COMMAND

; *** KEEPS YOU FROM GIVING A DECOY NOUN

COMMAND GIVE ANY
NOUNisNumber 298 (one of the decoy nouns)
OR
NOUNisNumber 297 (one of the decoy nouns)
OR
NOUNisNumber 296 (one of the decoy nouns)
PrintMessage 142 (You can't do that because it's not here.)
DoneWithTurn
END_COMMAND

COMMAND GIVE ANY
NOT Present 302  (Harvey not here.)
NOT Present 303  (Katz not here.)
PrintMessage 173 (There is nobody here to give anything to.)
DoneWithTurn
END_COMMAND

COMMAND GIVE ANY
Present 302   (Officer Harvey is here.)
NOUNisNumber 284 (Bloody Folder)
OR
Present 302   (Officer Harvey is here.)
NOUNisNumber 288 (Folder 8)
Destroy 284   (Bloody Folder)
Destroy 288   (Folder 8)
PrintMessage 150 (I don't think this $NOUN$ is going to help...)
DoneWithTurn
END_COMMAND

COMMAND GIVE ANY
Present 302   (Officer Harvey is here.)
DestroyNOUN   (Destroy whatever you try and give)
PrintMessage 150 (I don't think this $NOUN$ is going to help...)
DoneWithTurn
END_COMMAND

COMMAND GIVE ANY
Present 303 (Katz is here.)
Present 284 (Bloody folder is here.)
NOUNisNumber 284  (Bloody Folder)
OR
NOUNisNumber 288  (Folder 8)
Destroy 284  (Bloody Folder)
Destroy 288  (Folder 8)
ClearScreen
Delay 2
PrintMessage 172  (The bloody folder is not evidence)
ReDirectTo VERIFY ANY
END_COMMAND

COMMAND GIVE ANY
NOT NOUNisCarrying
PrintMessage 33 (You don't have the $NOUN$)
DoneWithTurn
END_COMMAND

COMMAND GIVE ANY TO KATZ
Present 303 (Katz is here.)
NOUNisNumber 254 (Draft memo)
Destroy 254 (Draft Memo)
AddToVariable 2 2
ClearScreen
Delay 2
PrintMessage 129 (This is very interesting....)
ReDirectTo VERIFY ANY
END_COMMAND

COMMAND GIVE ANY TO KATZ
Present 303 (Katz is here.)
NOUNisNumber 253 (Damaged paper)
TurnFlagON 71    (Have proved it's not suicide)
Destroy 253 (Damaged paper)
AddToVariable 2 2
ClearScreen
Delay 2
PrintMessage 129 (This is very interesting....)
ReDirectTo VERIFY ANY
END_COMMAND

COMMAND GIVE JOURNAL TO KATZ
Present 303  (Katz is here.)
Destroy 218   (Journal and all that's inside)
AddToVariable 2 2
TurnFlagON 9 (Have given Journal to Katz)
ClearScreen
Delay 2
PrintMessage 129 (This is very interesting....)
ReDirectTo VERIFY ANY
END_COMMAND

COMMAND GIVE 1-19-92 TO KATZ
Present 303  (Katz is here.)
ReDirectTo GIVE JOURNAL TO KATZ
END_COMMAND

COMMAND GIVE 1-20-92 TO KATZ
Present 303  (Katz is here.)
ReDirectTo GIVE JOURNAL TO KATZ
END_COMMAND

COMMAND GIVE 1-21-92 TO KATZ
Present 303  (Katz is here.)
ReDirectTo GIVE JOURNAL TO KATZ
END_COMMAND

COMMAND GIVE 1-22-92 TO KATZ
Present 303  (Katz is here.)
ReDirectTo GIVE JOURNAL TO KATZ
END_COMMAND

COMMAND GIVE 1-23-92 TO KATZ
Present 303  (Katz is here.)
ReDirectTo GIVE JOURNAL TO KATZ
END_COMMAND

COMMAND GIVE PAGE TO KATZ
Present 303  (Katz is here.)
ReDirectTo GIVE JOURNAL TO KATZ
END_COMMAND

COMMAND GIVE NOTE TO KATZ
Present 303 (Katz is here.)
Destroy 251       (Suicide Note)
TurnFlagON 70      (Have given suicide note to Katz)
AddToVariable 2 1  (This is only worth one point)
ClearScreen
Delay 2
PrintMessage 129 (This is very interesting....)
ReDirectTo VERIFY ANY
END_COMMAND

COMMAND GIVE TEST TO KATZ
Present 303 (Katz is here.)
TurnFlagON 72 (have given typed stationery to Katz)
AddToVariable 2 1 (Only worth one point)
ClearScreen
Delay 2
PrintMessage 129 (This is very interesting....)
ReDirectTo VERIFY ANY
END_COMMAND

COMMAND GIVE ANY TO KATZ
Present 303 (Katz is here.)
DestroyNOUN (Destroy whatever it is.)
ClearScreen
Delay 2
PrintMessage 128 (Thanks but Not of interest to me...)
ReDirectTo VERIFY ANY
END_COMMAND

&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&


COMMAND VERIFY ANY
NOT Present 303 (Katz not here.)
PrintMessage 105 (Sorry, can't do that...)
DoneWithTurn
END_COMMAND

COMMAND VERIFY ANY
CounterLT 8 6  (Have not yet had  six chances here with Katz)
VariableLT 2 6 (Have less then three pieces of evidence to Katz)
PrintMessage 132 (...got anything else?")
DoneWithTurn
END_COMMAND

$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$

COMMAND VERIFY ANY
FlagOFF 8 (Did not give correct answer)
PrintMessage 131 (...You have failed to win the game)
WaitForReturn
ClearScreen
PrintMessage 139 (You gave incorrect answer...)
WaitForReturn
EndGame
DoneWithTurn
END_COMMAND

COMMAND VERIFY ANY
FlagON 70       (Suicide Note given to Katz)
FlagON 72       (Typed on Stationery given to Katz)
TurnFlagON 71    (Determined that it is NOT suicide)
END_COMMAND

COMMAND VERIFY ANY
FlagOFF 71      (Didn't rule out suicide)
PrintMessage 162  (we "might" have a case here...come with me.)
WaitForReturn
ClearScreen
PrintMessage 163  (It was determined to be suicide by investigators.)
WaitForReturn
EndGame
DoneWithTurn
END_COMMAND

COMMAND VERIFY ANY
VariableLT 2 6  (Not enough evidence)
OR
FlagOFF 9 (Didn't give Hamlet to Katz)
PrintMessage 131 (...You have failed to win the game)
WaitForReturn
ClearScreen
PrintMessage 138 (Harvey got away and your returned to work...)
WaitForReturn
EndGame
DoneWithTurn
END_COMMAND


COMMAND VERIFY ANY
VariableGT 2 5 (Have earned more than 5 evidence points)
FlagON 8 (Answered question Correctly)
FlagON 9 (Have give Hamlet to Katz)
PrintMessage 130 (You win the game !!!!!)
WaitForReturn
ClearScreen
PrintMessage 140 (You win, you are a hero, you are given a job as spy...)
WaitForReturn
WinGame
DoneWithTurn
END_COMMAND

&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&

COMMAND NORTH
AtLocation 2   (In Hallway)
ClearScreen
PrintMessage 118  (You go home and wife has left you...)
BlankLine
WaitForReturn
EndGame
DoneWithTurn
END_COMMAND

; *** KEEPS YOU FROM KISSING A DECOY NOUN

COMMAND KISS ANY
NOUNisNumber 298 (one of the decoy nouns)
OR
NOUNisNumber 297 (one of the decoy nouns)
OR
NOUNisNumber 296 (one of the decoy nouns)
PrintMessage 142 (You can't do that because it's not here.)
DoneWithTurn
END_COMMAND

COMMAND KISS ANY
NOT AtLocation 10       (Not in office)
NOT NOUNPresent         (Noun is not here.)
PrintMessage 142        (You can't do that, because it's not here.)
DoneWithTurn
END_COMMAND

COMMAND KISS ANY
PrintMessage 137 (It wouldn't be helpful to $VERB$ the $NOUN$.)
DoneWithTurn
END_COMMAND

; *** KEEPS YOU FROM SHOWING A DECOY NOUN

COMMAND SHOW ANY
NOUNisNumber 298 (one of the decoy nouns)
OR
NOUNisNumber 297 (one of the decoy nouns)
OR
NOUNisNumber 296 (one of the decoy nouns)
PrintMessage 142 (You can't do that because it's not here.)
DoneWithTurn
END_COMMAND

COMMAND SHOW ANY
Present 302   (Officer Harvey is here.)
DestroyNOUN   (Destroy whatever you try and give)
PrintMessage 150 (I don't think this $NOUN$ is going to help...)
DoneWithTurn
END_COMMAND

COMMAND SHOW ANY
Present 303   (Katz is here.)
PrintMessage 151  (If you have any evidence please give it to me.)
END_COMMAND

; *********************CHECKS TO SEE IF YOU ARE TRYING TO HANG UP PHONE

COMMAND HANG UP ANY
IsCarrying 255         (Phone Receiver)
DropIt 255             (Phone Receiver)
TurnFlagOFF 255        (Talking to security flag)
TurnCounterOFF 6       (Phone now back on hook)
PrintMessage 8 (You put receiver back on cradle)
DoneWithTurn
END_COMMAND

COMMAND HANG UP ANY
PrintMessage 114       (You can't hang up the $NOUN$)
DoneWithTurn
END_COMMAND

COMMAND HIDE ANY
PrintMessage 158  (There's no place to hide.)
DoneWithTurn
END_COMMAND

COMMAND NOTIFY SECURITY
AtLocation 2      (In hallway)
ClearScreen
PrintMessage 160  (You notify security and...)
WaitForReturn
EndGame
DoneWithTurn
END_COMMAND

COMMAND NOTIFY SECURITY
AtLocation 10
PrintMessage 161 (Might be a good idea, but how...?)
DoneWithTurn
END_COMMAND

COMMAND FIX ANY
NOT AtLocation 10       (Not in office)
NOT NOUNPresent         (Noun is not here.)
PrintMessage 142        (You can't do that, because it's not here.)
DoneWithTurn
END_COMMAND

COMMAND FIX SHREDDER
PrintMessage 164 (It's beyond repair)
DoneWithTurn
END_COMMAND

; *** KEEPS YOU FROM ASKING A DECOY NOUN

COMMAND ASK ANY
NOUNisNumber 298 (one of the decoy nouns)
OR
NOUNisNumber 297 (one of the decoy nouns)
OR
NOUNisNumber 296 (one of the decoy nouns)
PrintMessage 142 (You can't do that because it's not here.)
DoneWithTurn
END_COMMAND

COMMAND ASK ANY
Present 302  (Harvey is here.)
PrintMessage 111 (You're the one who has the explaining to do.)
DoneWithTurn
END_COMMAND


COMMAND ASK ANY
Present 303 (Katz)
PrintMessage 112  (I can't tell you anything, if you have anything give it...)
DoneWithTurn
END_COMMAND

; *** KEEPS YOU FROM TELLING A DECOY NOUN

COMMAND TELL ANY
NOUNisNumber 298 (one of the decoy nouns)
OR
NOUNisNumber 297 (one of the decoy nouns)
OR
NOUNisNumber 296 (one of the decoy nouns)
PrintMessage 142 (You can't do that because it's not here.)
DoneWithTurn
END_COMMAND

COMMAND TELL ANY
Present 302 (Harvey is here.)
PrintMessage 122 (I don't care what you tell me...)
DoneWithTurn
END_COMMAND

COMMAND TELL ANY
Present 303  (Katz is here.)
PrintMessage 123  (Please don't tell me, give me...)
DoneWithTurn
END_COMMAND

COMMAND DEBUG
ToggleFlag 0
DoneWithTurn
END_COMMAND

COMMAND USE ANY
PrintMessage 66
END_COMMAND
